<template>
  <div class="form-wrap">
    <div class="form" :style="bg">
      <div class="title">
        <h2>{{ title }}</h2>
      </div>

      <slot name="form"></slot>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  export default {
    props: {
      bg: {
        type: String,
        default: 'background: #fff'
      },
      title: {
        type: String,
        default: ''
      }
    }
  }
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
  @import "~@/common/stylus/variable.styl"
  @import "~@/common/stylus/mixin.styl"

  .title
    hh(40px)
    margin-bottom: 20px
    text-align: center
    font-weight: bold
    sc($font-large-x, $vice-color)
    h2
      hh(40px)

  .form-wrap
    padding: 150px 100px
    .form
      width: 45%
      padding: 40px 20px
      margin:0 auto
      box-shadow: 0 0 10px 1px $vice-color
      br(5px)
</style>